<div class="module">
<?php
$module[52]=getModTemplate(52);
$feed = getRssFeed(1);
if(is_file(CACHE_PATH.'feed_1.xml'))
{ $fcontent = getParseFeed(CACHE_PATH.'feed_1.xml', 4); }
else
{ $fcontent = getParseFeed($feed['url'], 4); }
?>
<?php if(is_array($fcontent)): ?>
	<div class="rss_feed">
		<h3 class="section-title"><?php echo $feed['name']; ?></h3><hr />
		<?php foreach($fcontent['item'] as $item): 
		$description = $item['description'];
		if($description != '')
		{
			$description = strip_tags($description);
			$description = $txt->formatText($description);
			$description = $txt->truncate($description, 500, '', '', '');
		}
		?>
		<div class="item">
			<h4><a href="<?php echo $item['link']; ?>" target="_blank"><?php echo trim($item['title']); ?></a></h4>
			<p class="description"><?php echo $description; ?> - <a href="<?php echo $item['link']; ?>" target="_blank"><?php echo ucfirst($txt->getWord('read_more')); ?>...</a></p>
		</div><hr />
		<?php endforeach; ?>
	</div>
<?php endif; ?>
</div>
<?php 
unset($feed);
unset($fcontent);
$feed = getRssFeed(2);
if(is_file(CACHE_PATH.'feed_2.xml'))
{ $fcontent = getParseFeed(CACHE_PATH.'feed_2.xml', 4, 2); }
else
{ $fcontent = getParseFeed($feed['url'], 4, 2); }
?>
<?php if(is_array($fcontent)): ?>
	<div class="rss_feed">
		<h3 class="section-title"><?php echo $feed['name']; ?></h3><hr />
		<?php foreach($fcontent['item'] as $item): 
		$description = $item['description'];
		if($description != '')
		{
			$description = strip_tags($description);
			$description = $txt->formatText($description);
			$description = $txt->truncate($description, 500, '', '', '');
			$clip = strpos($description, ';]');
			$clip = $clip-8;
			if($clip > 20)
			{
				$description = substr($description, 0, $clip);
			}
		}
		?>
		<div class="item">
			<h4><a href="<?php echo $item['link']; ?>" target="_blank"><?php echo trim($item['title']); ?></a></h4>
			<p class="description"><?php echo $description; ?> - <a href="<?php echo $item['link']; ?>" target="_blank"><?php echo ucfirst($txt->getWord('read_more')); ?>...</a></p>
		</div><hr />
		<?php endforeach; ?>
	</div>
<?php endif; ?>
</div>